import myAxios from "../axios";

// 售后管理接口
// 获取全部订单信息
export function getList(page = 1) {
  return myAxios.post("/aftersale/list", {
    cp: page,
    date1: "2022-02-12T12:53:43.545Z",
    date2: "2022-12-12T12:53:43.545Z",
    kw: "",
    ls: 5,
    state: "",
    type: "",
  });
}

// 获取详情信息
export function getById(id) {
  return myAxios.get(`/aftersale/one/${id}`);
}


// 财务管理接口
// 新增提现记录
export function addMoneyRecord(gets) {
  return myAxios.post("/getmoney/addMoney", {
    account: "123456789",
    date: "2022-12-14T06:17:28.244Z",
    declare: "无",
    getMoney: gets.toString(),
    id: 0,
    states: "",
    statesnum: 0,
  });
}

// 获取提现记录
// http://47.92.25.81:8081/getmoney/getmoney
export function getMoneyRecord() {
  return myAxios.get("/getmoney/getmoney");
}

// 收支明细  /getaccount/list
export function getAccount() {
  return myAxios.get("/getaccount/list");
}

// 获取银行账户信息
// /bankcard/getInfo/1
export function getInfo(id) {
  return myAxios.get(`/bankcard/getInfo/${id}`);
}

// 点击提现银行卡账户余额和账户总额的更新
export function bankUpdate(sums, totals) {
  return myAxios.post("/bankcard/update", {
    id: 1,
    cardnum: "123456789",
    cardsum: sums,
    total: totals,
  });
}
